//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopArea, MinishopAreaResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopAreaList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopAreaResponse>(`/uctoo/minishop_area/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopArea = async (id: string) => {
  return requestClient.get<MinishopArea>(`/uctoo/minishop_area/${id}`);
};

export const adductooMinishopArea = async (data: Partial<MinishopArea>) => {
  return requestClient.post<MinishopArea>('/uctoo/minishop_area/add', data);
};

export const edituctooMinishopArea = async (data: Partial<MinishopArea>) => {
  return requestClient.post<MinishopArea>('/uctoo/minishop_area/edit', data);
};

export const deleteuctooMinishopArea = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_area/del', { id });
};
